/** *
  * Scala编程实战 P273
  *
  */

object collection1011 extends App {

  val days = Array("Sunday", "Monday", "TuesDay", "Wednesday", "Thursday", "Friday", "Saturday")

  days.zipWithIndex.foreach {
    case (day, count) => println(s"$count is $day")
  }

  println("========")

  for ((day, count) <- days.zipWithIndex) {
    println(s"$count is $day")
  }
}
